<!-- right-->
<div class="member-main">
<div>

<div class="title"><span style="float:left"><{t}>我的收藏<{/t}></span></div>

<{if !$favorite}>
<div class="noinfo"><{t}>暂无收藏<{/t}></div>
<{else}>
<div class="GoodsSearchWrap" id="mbc-my-fav">
<div class="ItemsWarp clearfix">
  <div product="<{$good.goods_id}>" id="goods_<{$good.goods_id}>">
    <table class="gridlist border-all" width="100%" border="0" cellspacing="0" cellpadding="0">
    <col class="span-8"></col >
    <col class="span-1"></col >
    <col class="span-3"></col >
    <tr>
    <th class="first"><{t}>商品名称<{/t}></th>
    <th><{t}>金额<{/t}></th>
    <th><{t}>操作<{/t}></th>
    </tr>
<{foreach from=$favorite item="good"}>
      <tr id="goods_<{$good.goods_id}>" class="itemsList" product="<{$good.goods_id}>">
	   <td style="white-space:normal" class="horizontal-m">
        <{if $good.udfimg == 'true'}>
  <{assign var="gimage" value=$good.thumbnail_pic}>
  <{else}>
  <{assign var="gimage" value=$good.image_default_id|default:$defaultImage}>
  <{/if}>
  <div class="goodpic"><a target="_blank" style='<{if $env.conf.site.thumbnail_pic_width !=0 && $env.conf.site.thumbnail_pic_height !=0}> width:<{$env.conf.site.thumbnail_pic_width}>px;height:<{$env.conf.site.thumbnail_pic_height}>px;<{/if}>' href="<{link app=b2c ctl=site_product act=index arg=$good.goods_id}>">
    <img  style="width:50px; height:58px;" src="<{$gimage|storager:'s'}>"  alt="<{$product.name|escape:html}>"/>

    <{*<span class='zoom-handle' pic='<{$product.big_pic|default:$env.conf.site.default_big_pic|storager}>'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>*}>
  </a></div>
  <div class="goods-main">
  <div class="goodinfo" >
  <h6><a href="<{link app="b2c" ctl="site_product" act="index" arg0=$good.goods_id}>" title="<{$good.name}>"><{$good.name}></a></h6>
   <p><{$good.brief}></p></div>
  </div>
  </td>
   <td class='price-button' align="center">
        <ul>
            <li><span class="font-red font13px fontbold"><{$good.price|cur_odr}></span><{if $good.mktprice && $setting.mktprice}><span class="mktprice1"><{t}>市场价: <{/t}><{$good.mktprice|cur_odr}></span><{/if}></li>
            <{if $product.mktprice > $good.price && $setting.mktprice && $setting.saveprice > 0}>
            <li style="padding-left:4px; padding-top:8px;">
			<span class="saveprice1"> <{if $setting.saveprice == 1}><{t}>节省:<{/t}><{$good.mktprice-$good.price|cur_odr}>
              <{elseif $setting.saveprice == 2}><{t}>优惠:<{/t}><{$good.price/$product.mktprice*100|number:'2'}>%
              <{elseif $setting.saveprice == 3}><{$good.price/$product.mktprice*10|number:'1'}><{t}>折<{/t}>
			  <{/if}></span></li>
            <{/if}>
          </ul>
          </td>
  <td align="left" style="vertical-align:top" class="member-fav">
<ul class="fav-Operator">
<li><{goodsmenu product=$good compare=true setting=$setting z-index=9999 showtextbuy=false member=2}></li>
<li class="icon1 "style="clear:both;height:20px;"><a href="javascript:void(0)" class="member-btn-bj" rel="_gcomp_" data-gcomp="{gid:'<{$good.goods_id}>',gname:'<{$good.name|escape:'quotes'}>',gtype:'<{$good.type_id}>',url:'<{link app=b2c ctl=site_product act=index arg0=$good.goods_id}>'}" title="<{t}>商品对比<{/t}>"><i class="has-icon"> <img src='<{$env.app.res_url}>/bundle/contrast_icon.gif' /></i><span><{t}>商品对比<{/t}></span></a></li>
<li class="icon2 " style="clear:both"><a href="javascript:void(0)" class="member-btn-bj" onClick="doDelFav('<{$good.goods_id}>')"><i class="has-icon"> <img src='<{$env.app.res_url}>/bundle/delecate.gif' /></i><span><{t}>移除<{/t}></span></a></li>
</ul>
        </td>
      </tr>
  <{/foreach}>
    </table>
  </div>
  </div>
  </div>
<{pagers data=$pager}>
<{/if}>

<div class='FormWrap goods-compare' id='goods-compare' style='display:none'>
<div class='title'><h3><{t}>商品对比<{/t}><span class='close-gc' onclick='gcompare.hide()'><{t}>[关闭]<{/t}></span></h3></div>
   <form action='<{link app="b2c" ctl="site_product" act="diff"}>' method='post' target='_compare_goods'>
      <ul class='compare-box'>
         <li class='division clearfix tpl'>
            <div class='goods-name'>
               <a href='#' title='{gname}'>{gname}</a>
            </div>
            <span class='btn-delete' onclick='gcompare.erase("{gid}",this);'><{t}>删除<{/t}></span>
         </li>
      </ul>
      <div class='compare-bar' >
	  <!-- <a class="btn-a btn-compare" name="comareing" onclick='gcompare.submit()'><span><{t}>对比<{/t}></span></a> -->
          <input type="button" name="comareing" onclick='gcompare.submit()' class="btn-compare" value="<{t}>对比<{/t}>">
          <input type="button" class="btn-compare" onclick="gcompare.empty()" value="<{t}>清空<{/t}>">
      </div>
   </form>
</div>
<!--<{script src='goodscupcake.js' app='b2c'}>-->
<script>
  function doDelFav(gid){
    Ex_Dialog.confirm('<{t}>确定删除?<{/t}>',function(e){
        if(!e) return false;
        new Request({
            url:Shop.base_url+'/index.php/member-ajax_del_fav-goods-'+ gid +'.html',
            onComplete:function(){
               new Fx.Tween($('goods_'+gid)).start('opacity',0).chain(function(){
                    // 暂时这样改.
                    if ($$('.itemsList')&&$$('.itemsList').length<=1) location.reload();
                    $('goods_'+gid).destroy();
               });

            }
        }).post('t='+new Date());
        $('goods_'+gid).setOpacity(.5);
        var MEMBER=Cookie.read('S[MEMBER]');
        var FAVCOOKIE= new Cookie('S[GFAV]['+MEMBER+']',{duration:365});
        FAVCOOKIE.write(Array.from((FAVCOOKIE.read('S[GFAV]')||'').split(',')).erase(gid).join(','));
        return false;
    });
  }
</script>

</div>
</div>
<!-- right-->
